﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using L = Science.Mathematics.LinearAlgebra;

namespace Strang3Ed.Chapter01.Section2
{
    public class ExampleB
    {
        public ExampleB()
        {
        }
        private string result;
        public string Result
        {
            get { return result; }
        }
        public void Compute()
        {
            L.Vector v = new L.Vector(2);
            v[0] = 3.0;
            v[1] = 4.0;

            L.Vector u = new L.Vector(2);
            u[0] = v[0] / v.Length;
            u[1] = v[1] / v.Length;

            L.Vector V = new L.Vector(2);
            V[0] = -4.0;
            V[1] = 3.0;

            L.Vector U = new L.Vector(2);
            U[0] = V[0] / V.Length;
            U[1] = V[1] / V.Length;

            result += u[0].ToString() + "   " + u[1].ToString() + "\r\n";
            result += U[0].ToString() + "   " + U[1].ToString() + "\r\n";
            result += (-4.0 / 5.0).ToString() + "   "+ (3.0 / 5.0).ToString() + "\r\n";
        }
    }
}
/*
0.6   0.8
-0.8   0.6
-0.8   0.6
*/

